package GUI;

import javax.swing.*;
import java.awt.*;

public class Xl extends JFrame {

    static String[] str ={"第一个","第二个","第三个"};


    public Xl(String title){
    super(title);

    getContentPane().setLayout(new GridLayout(2,2,0,0));
        JLabel label = new JLabel("标签一");
        label.setHorizontalAlignment(SwingConstants.RIGHT);
        getContentPane().add(label);
        JComboBox jComboBox = new JComboBox(str);
//        jComboBox.addActionListener(e -> {
//            JComboBox cd = (JComboBox) e.getSource();
//            String
//        });
        getContentPane().add(jComboBox);
        setSize(300,300);
        setVisible(true);
        }
}
